var coumt = 8 //每页的个数 
var datas = null
var xiaobiao = 0

function addspicture(e) {
    //确定分页
    var pagesize = Math.ceil(datas.length / coumt)
    var htmls = ""
        // console.log("e")
    console.log(pagesize)
    console.log("体检")
    for (var i = e * coumt; i < coumt * (e + 1); i++) {
        // console.log(pagesize)
        // console.log(i)
        if (datas[i]) {
            htmls += `<li><img src="${datas[i].img}" alt="" style="width: 200px;height: 200px;">

            <div style="text-align: center;width: 200px;height: 200px;">
                <p>${datas[i].name}</p>


            </div>
        </li>
`
        }
        document.getElementById("ones").innerHTML = htmls
    }
}
$(function() {
    // var count = $("a")
    // for (var i = 0; i < count.length; i++) {
    //     count[i].mousemove.css("color", "red")
    // }
    $.getJSON("../json/shouye.json", function(e) {
        datas = e
        console.log(e)
            // addpicture()
        addspicture(0)
            // ma  
    })
})